3.127 \(\int \frac {c+d x^2+e x^4+f x^6}{(a+b x^2)^2} \, dx\)

Optimal. Leaf size=118 \[ \frac {x \left (c-\frac {a \left (a^2 f-a b e+b^2 d\right )}{b^3}\right )}{2 a \left (a+b x^2\right )}+\frac {\tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (5 a^3 f-3 a^2 b e+a b^2 d+b^3 c\right )}{2 a^{3/2} b^{7/2}}+\frac {x (b e-2 a f)}{b^3}+\frac {f x^3}{3 b^2} \]

[Out]

(-2*a*f+b*e)*x/b^3+1/3*f*x^3/b^2+1/2*(c-a*(a^2*f-a*b*e+b^2*d)/b^3)*x/a/(b*x^2+a)+1/2*(5*a^3*f-3*a^2*b*e+a*b^2*
d+b^3*c)*arctan(x*b^(1/2)/a^(1/2))/a^(3/2)/b^(7/2)

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 118, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {1814, 1153, 205} \[ \frac {x \left (c-\frac {a \left (a^2 f-a b e+b^2 d\right )}{b^3}\right )}{2 a \left (a+b x^2\right )}+\frac {\tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (-3 a^2 b e+5 a^3 f+a b^2 d+b^3 c\right )}{2 a^{3/2} b^{7/2}}+\frac {x (b e-2 a f)}{b^3}+\frac {f x^3}{3 b^2} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2)^2,x]

[Out]

((b*e - 2*a*f)*x)/b^3 + (f*x^3)/(3*b^2) + ((c - (a*(b^2*d - a*b*e + a^2*f))/b^3)*x)/(2*a*(a + b*x^2)) + ((b^3*
c + a*b^2*d - 3*a^2*b*e + 5*a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(3/2)*b^(7/2))

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 1153

Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(
d + e*x^2)^q*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 -
b*d*e + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rule 1814

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[P
olynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[((a
*g - b*f*x)*(a + b*x^2)^(p + 1))/(2*a*b*(p + 1)), x] + Dist[1/(2*a*(p + 1)), Int[(a + b*x^2)^(p + 1)*ExpandToS
um[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]

Rubi steps

\begin {align*} \int \frac {c+d x^2+e x^4+f x^6}{\left (a+b x^2\right )^2} \, dx &=\frac {\left (c-\frac {a \left (b^2 d-a b e+a^2 f\right )}{b^3}\right ) x}{2 a \left (a+b x^2\right )}-\frac {\int \frac {-\frac {b^3 c+a b^2 d-a^2 b e+a^3 f}{b^3}-\frac {2 a (b e-a f) x^2}{b^2}-\frac {2 a f x^4}{b}}{a+b x^2} \, dx}{2 a}\\ &=\frac {\left (c-\frac {a \left (b^2 d-a b e+a^2 f\right )}{b^3}\right ) x}{2 a \left (a+b x^2\right )}-\frac {\int \left (-\frac {2 a (b e-2 a f)}{b^3}-\frac {2 a f x^2}{b^2}+\frac {-b^3 c-a b^2 d+3 a^2 b e-5 a^3 f}{b^3 \left (a+b x^2\right )}\right ) \, dx}{2 a}\\ &=\frac {(b e-2 a f) x}{b^3}+\frac {f x^3}{3 b^2}+\frac {\left (c-\frac {a \left (b^2 d-a b e+a^2 f\right )}{b^3}\right ) x}{2 a \left (a+b x^2\right )}+\frac {\left (b^3 c+a b^2 d-3 a^2 b e+5 a^3 f\right ) \int \frac {1}{a+b x^2} \, dx}{2 a b^3}\\ &=\frac {(b e-2 a f) x}{b^3}+\frac {f x^3}{3 b^2}+\frac {\left (c-\frac {a \left (b^2 d-a b e+a^2 f\right )}{b^3}\right ) x}{2 a \left (a+b x^2\right )}+\frac {\left (b^3 c+a b^2 d-3 a^2 b e+5 a^3 f\right ) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{7/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.10, size = 122, normalized size = 1.03 \[ -\frac {x \left (a^3 f-a^2 b e+a b^2 d-b^3 c\right )}{2 a b^3 \left (a+b x^2\right )}+\frac {\tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) \left (5 a^3 f-3 a^2 b e+a b^2 d+b^3 c\right )}{2 a^{3/2} b^{7/2}}+\frac {x (b e-2 a f)}{b^3}+\frac {f x^3}{3 b^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2)^2,x]

[Out]

((b*e - 2*a*f)*x)/b^3 + (f*x^3)/(3*b^2) - ((-(b^3*c) + a*b^2*d - a^2*b*e + a^3*f)*x)/(2*a*b^3*(a + b*x^2)) + (
(b^3*c + a*b^2*d - 3*a^2*b*e + 5*a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(2*a^(3/2)*b^(7/2))

________________________________________________________________________________________

fricas [A]  time = 0.65, size = 364, normalized size = 3.08 \[ \left [\frac {4 \, a^{2} b^{3} f x^{5} + 4 \, {\left (3 \, a^{2} b^{3} e - 5 \, a^{3} b^{2} f\right )} x^{3} - 3 \, {\left (a b^{3} c + a^{2} b^{2} d - 3 \, a^{3} b e + 5 \, a^{4} f + {\left (b^{4} c + a b^{3} d - 3 \, a^{2} b^{2} e + 5 \, a^{3} b f\right )} x^{2}\right )} \sqrt {-a b} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) + 6 \, {\left (a b^{4} c - a^{2} b^{3} d + 3 \, a^{3} b^{2} e - 5 \, a^{4} b f\right )} x}{12 \, {\left (a^{2} b^{5} x^{2} + a^{3} b^{4}\right )}}, \frac {2 \, a^{2} b^{3} f x^{5} + 2 \, {\left (3 \, a^{2} b^{3} e - 5 \, a^{3} b^{2} f\right )} x^{3} + 3 \, {\left (a b^{3} c + a^{2} b^{2} d - 3 \, a^{3} b e + 5 \, a^{4} f + {\left (b^{4} c + a b^{3} d - 3 \, a^{2} b^{2} e + 5 \, a^{3} b f\right )} x^{2}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) + 3 \, {\left (a b^{4} c - a^{2} b^{3} d + 3 \, a^{3} b^{2} e - 5 \, a^{4} b f\right )} x}{6 \, {\left (a^{2} b^{5} x^{2} + a^{3} b^{4}\right )}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a)^2,x, algorithm="fricas")

[Out]

[1/12*(4*a^2*b^3*f*x^5 + 4*(3*a^2*b^3*e - 5*a^3*b^2*f)*x^3 - 3*(a*b^3*c + a^2*b^2*d - 3*a^3*b*e + 5*a^4*f + (b
^4*c + a*b^3*d - 3*a^2*b^2*e + 5*a^3*b*f)*x^2)*sqrt(-a*b)*log((b*x^2 - 2*sqrt(-a*b)*x - a)/(b*x^2 + a)) + 6*(a
*b^4*c - a^2*b^3*d + 3*a^3*b^2*e - 5*a^4*b*f)*x)/(a^2*b^5*x^2 + a^3*b^4), 1/6*(2*a^2*b^3*f*x^5 + 2*(3*a^2*b^3*
e - 5*a^3*b^2*f)*x^3 + 3*(a*b^3*c + a^2*b^2*d - 3*a^3*b*e + 5*a^4*f + (b^4*c + a*b^3*d - 3*a^2*b^2*e + 5*a^3*b
*f)*x^2)*sqrt(a*b)*arctan(sqrt(a*b)*x/a) + 3*(a*b^4*c - a^2*b^3*d + 3*a^3*b^2*e - 5*a^4*b*f)*x)/(a^2*b^5*x^2 +
 a^3*b^4)]

________________________________________________________________________________________

giac [A]  time = 0.40, size = 126, normalized size = 1.07 \[ \frac {{\left (b^{3} c + a b^{2} d + 5 \, a^{3} f - 3 \, a^{2} b e\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a b^{3}} + \frac {b^{3} c x - a b^{2} d x - a^{3} f x + a^{2} b x e}{2 \, {\left (b x^{2} + a\right )} a b^{3}} + \frac {b^{4} f x^{3} - 6 \, a b^{3} f x + 3 \, b^{4} x e}{3 \, b^{6}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a)^2,x, algorithm="giac")

[Out]

1/2*(b^3*c + a*b^2*d + 5*a^3*f - 3*a^2*b*e)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a*b^3) + 1/2*(b^3*c*x - a*b^2*d*x
 - a^3*f*x + a^2*b*x*e)/((b*x^2 + a)*a*b^3) + 1/3*(b^4*f*x^3 - 6*a*b^3*f*x + 3*b^4*x*e)/b^6

________________________________________________________________________________________

maple [A]  time = 0.01, size = 177, normalized size = 1.50 \[ \frac {f \,x^{3}}{3 b^{2}}-\frac {a^{2} f x}{2 \left (b \,x^{2}+a \right ) b^{3}}+\frac {5 a^{2} f \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, b^{3}}+\frac {a e x}{2 \left (b \,x^{2}+a \right ) b^{2}}-\frac {3 a e \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, b^{2}}+\frac {c x}{2 \left (b \,x^{2}+a \right ) a}+\frac {c \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, a}-\frac {d x}{2 \left (b \,x^{2}+a \right ) b}+\frac {d \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, b}-\frac {2 a f x}{b^{3}}+\frac {e x}{b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a)^2,x)

[Out]

1/3*f*x^3/b^2-2/b^3*a*f*x+1/b^2*e*x-1/2/b^3*a^2*x/(b*x^2+a)*f+1/2/b^2*a*x/(b*x^2+a)*e-1/2/b*x/(b*x^2+a)*d+1/2/
(b*x^2+a)/a*c*x+5/2/b^3*a^2/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*f-3/2/b^2*a/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)
*b*x)*e+1/2/b/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*d+1/2/(a*b)^(1/2)/a*c*arctan(1/(a*b)^(1/2)*b*x)

________________________________________________________________________________________

maxima [A]  time = 2.97, size = 117, normalized size = 0.99 \[ \frac {{\left (b^{3} c - a b^{2} d + a^{2} b e - a^{3} f\right )} x}{2 \, {\left (a b^{4} x^{2} + a^{2} b^{3}\right )}} + \frac {b f x^{3} + 3 \, {\left (b e - 2 \, a f\right )} x}{3 \, b^{3}} + \frac {{\left (b^{3} c + a b^{2} d - 3 \, a^{2} b e + 5 \, a^{3} f\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a b^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a)^2,x, algorithm="maxima")

[Out]

1/2*(b^3*c - a*b^2*d + a^2*b*e - a^3*f)*x/(a*b^4*x^2 + a^2*b^3) + 1/3*(b*f*x^3 + 3*(b*e - 2*a*f)*x)/b^3 + 1/2*
(b^3*c + a*b^2*d - 3*a^2*b*e + 5*a^3*f)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*a*b^3)

________________________________________________________________________________________

mupad [B]  time = 0.10, size = 113, normalized size = 0.96 \[ x\,\left (\frac {e}{b^2}-\frac {2\,a\,f}{b^3}\right )+\frac {f\,x^3}{3\,b^2}+\frac {x\,\left (-f\,a^3+e\,a^2\,b-d\,a\,b^2+c\,b^3\right )}{2\,a\,\left (b^4\,x^2+a\,b^3\right )}+\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )\,\left (5\,f\,a^3-3\,e\,a^2\,b+d\,a\,b^2+c\,b^3\right )}{2\,a^{3/2}\,b^{7/2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2)^2,x)

[Out]

x*(e/b^2 - (2*a*f)/b^3) + (f*x^3)/(3*b^2) + (x*(b^3*c - a^3*f - a*b^2*d + a^2*b*e))/(2*a*(a*b^3 + b^4*x^2)) +
(atan((b^(1/2)*x)/a^(1/2))*(b^3*c + 5*a^3*f + a*b^2*d - 3*a^2*b*e))/(2*a^(3/2)*b^(7/2))

________________________________________________________________________________________

sympy [A]  time = 2.88, size = 201, normalized size = 1.70 \[ x \left (- \frac {2 a f}{b^{3}} + \frac {e}{b^{2}}\right ) + \frac {x \left (- a^{3} f + a^{2} b e - a b^{2} d + b^{3} c\right )}{2 a^{2} b^{3} + 2 a b^{4} x^{2}} - \frac {\sqrt {- \frac {1}{a^{3} b^{7}}} \left (5 a^{3} f - 3 a^{2} b e + a b^{2} d + b^{3} c\right ) \log {\left (- a^{2} b^{3} \sqrt {- \frac {1}{a^{3} b^{7}}} + x \right )}}{4} + \frac {\sqrt {- \frac {1}{a^{3} b^{7}}} \left (5 a^{3} f - 3 a^{2} b e + a b^{2} d + b^{3} c\right ) \log {\left (a^{2} b^{3} \sqrt {- \frac {1}{a^{3} b^{7}}} + x \right )}}{4} + \frac {f x^{3}}{3 b^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x**6+e*x**4+d*x**2+c)/(b*x**2+a)**2,x)

[Out]

x*(-2*a*f/b**3 + e/b**2) + x*(-a**3*f + a**2*b*e - a*b**2*d + b**3*c)/(2*a**2*b**3 + 2*a*b**4*x**2) - sqrt(-1/
(a**3*b**7))*(5*a**3*f - 3*a**2*b*e + a*b**2*d + b**3*c)*log(-a**2*b**3*sqrt(-1/(a**3*b**7)) + x)/4 + sqrt(-1/
(a**3*b**7))*(5*a**3*f - 3*a**2*b*e + a*b**2*d + b**3*c)*log(a**2*b**3*sqrt(-1/(a**3*b**7)) + x)/4 + f*x**3/(3
*b**2)

________________________________________________________________________________________